﻿using System;
using System.IO;
using Tfs2010AttachmentsCleaner.Properties;

namespace Tfs2010AttachmentsCleaner
{
    internal class Logger
    {
        public Logger()
        {
            File.Delete(Settings.Default.LogPath);
        }

        public void WriteLine(string text)
        {
            Console.WriteLine(text);

            using (var stream = new StreamWriter(Settings.Default.LogPath, append: true))
            {
                stream.WriteLine(text);
            }
        }
    }
}
